package cn.tedu.medicalappointmentsystemk.dao.persist.repository;

import cn.tedu.medicalappointmentsystemk.pojo.bo.AppointmentSelectBO;
import cn.tedu.medicalappointmentsystemk.pojo.bo.AppointmentSelectByUserIdBO;
import cn.tedu.medicalappointmentsystemk.pojo.po.AppointmentPO;
import com.github.pagehelper.Page;

import java.util.Date;
import java.util.List;

public interface AppointmentRepository {
    Integer insert(AppointmentPO po);

    Page<AppointmentSelectBO> selectAppointment();

    AppointmentPO selectAppointment(Long id);

    Integer deleteAppointmentById(Long id);

    Integer updateAppointment(AppointmentPO po);

    AppointmentSelectByUserIdBO selectByUserId(Long id);

    Page<AppointmentSelectByUserIdBO> selectAppointmentsByUserId(Long id);

    Long selectAppointmentByCreateDate(Date createDate,Long patientId);

    Integer selectTotal();

    Integer selectToday();

    Integer selectLastMonth();

    List<AppointmentSelectBO> selectByNickname(String nickname);

    Page<AppointmentSelectBO> searchLastWeek();

    Page<AppointmentSelectBO> searchLastMonth();

    Page<AppointmentSelectBO> searchToday();
}
